home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 November / EnigmA AMIGA RUN 02 (1995)(G.R. Edizioni)(IT)[!][issue 1995-11][Skylink CD].iso / earcd / program / amos / amoslist.lzh / AMOSLIST / 000270_amos-request@svcs1.digex.net_Tue Sep 19 14:59:54 1995.msg < prev    next >
Internet Message Format  |  1995-10-02  |  3KB

  1. Received: from svcs1.digex.net (svcs1.digex.net [204.91.197.224]) by mail1.access.digex.net (8.6.12/8.6.12) with ESMTP id OAA04779;  for <mcox@access.digex.net> ; Tue, 19 Sep 1995 14:59:49 -0400
  2. Received: (from daemon@localhost) by svcs1.digex.net (8.6.12/8.6.12) id MAA14860 for amos-out; Tue, 19 Sep 1995 12:39:56 -0400
  3. Received: from mail1.access.digex.net (mail1.access.digex.net [205.197.247.2]) by svcs1.digex.net (8.6.12/8.6.12) with ESMTP id MAA14855 for <amos-list@svcs1.digex.net>; Tue, 19 Sep 1995 12:39:55 -0400
  4. Received: from red.paston.co.uk (red.paston.co.uk [194.129.188.3]) by mail1.access.digex.net (8.6.12/8.6.12) with SMTP id MAA15061;  for <amos-list@access.digex.net> ; Tue, 19 Sep 1995 12:39:49 -0400
  5. Received: from localhost (bwyatt.paston.co.uk) by red.paston.co.uk (5.x/SMI-SVR4)
  6.     id AA01233; Tue, 19 Sep 1995 17:32:20 +0100
  7. Received: by paston.co.uk.uucp (V1.16/Amiga)
  8.     id AA001ks; Tue, 19 Sep 95 21:32:16 GMT
  9. Date: Tue, 19 Sep 95 21:32:16 GMT
  10. Message-Id: <9509192132.AA001kr@paston.co.uk.uucp>
  11. Lines: 44
  12. X-Mailer: ADMail 1.5 Copyright 1995 S.T.Brown
  13. From: bwyatt@paston.co.uk (Ben Wyatt)
  14. To: amos-list@access.digex.net
  15. Subject: Re: Bits and Pieces (fwd)
  16. Status: O
  17. X-Status: 
  18.  
  19. Greetings Mark, you wrote some text on the subject Re: Bits and Pieces, and
  20. now I'm going to answer it.
  21.  
  22. MC> > Use banks to store data like that... it'll take less memory and will be
  23. MC> > much neater...
  24. MC> > 
  25. MC> 
  26. MC> Hmmn, I'm not so sure ;-)
  27. MC> 
  28. MC> The difference in memory would be about 20K - and I'm willing to 
  29. MC> sacrafice that for what I think is the neater method.
  30. MC> 
  31. MC> At the moment I read in all the stats (at the begining of the 
  32. MC> program) from a data bank that I have set up.  
  33. MC> 
  34. MC> Say, I have 10 teams with 20 players in each and each player has 10 
  35. MC> stats (assume all 2 byte integers). Reading a stat from the Data 
  36. MC> Bank, I would have to do something like:
  37. MC> 
  38. MC>       Result=Deek(Start(Bank)+400*Team+20*Player+2*Statnum)
  39. MC> 
  40. MC> Actually, it would be much worse this because I have so many 
  41. MC> different types of stats that I would need to store pointers for 
  42. MC> where each type of stat is in the bank - this would take up even more 
  43. MC> memory and would be very untidy.
  44. MC> 
  45. MC> Compare this to loading all data from the bank into arrays. Then all 
  46. MC> I would have to do to access a stat is
  47. MC> 
  48. MC>      Result=Statistic(Player,Team,Statnum)
  49. MC> 
  50. MC> Much nicer, dont you agree.....?
  51.  
  52. I guess so... but how about this:
  53.  
  54. Def fn _RESULT(Player,Team,Statnum)=Deek(Start(Bank)+400*Team+20*Player+2*Statnum)
  55. Result=Fn_RESULT(Player,Team,Statnum)
  56.  
  57. Which would be neat-ish...
  58.  
  59. Bye  _________________________________
  60.     /                                 \
  61.     > Ben Wyatt - bwyatt@paston.co.uk <
  62.     \_________________________________/ ï¿½1995 Very Interesting Signatures